<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="org.springside.modules.security.springsecurity.SpringSecurityUtils"%>
<%@ include file="/common/taglibs.jsp"%>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return divSearch(this, 'rightContent');" action="${ctx}/account/dept.action"
		method="post">
		<%@include file="/common/pageParam.jsp"%>
		<div class="searchBar">
			<ul class="searchContent">
				<li>
					<label> 部门名： </label> 
					<input type="text" name="name" value="${param['name']}" size="30" /> 
					<input type="hidden" name="pname" value="${param['pname']}" />
					<input type="hidden" name="id" value="${id}" /></li>
			</ul>
			<%@include file="/common/subBar.jsp"%>
		</div>
	</form>
</div>
<div class="pageContent" style="overflow-x: hidden">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="icon" href="${ctx}/account/dept.action?id=${id}&pname=${param['pname']}" target="ajax" rel="rightContent"><span>刷新</span> </a></li>
			<li class="line">line</li>
			<security:authorize ifAnyGranted="A_ADD_DEPT">
				<li><a class="add" href="${ctx}/account/dept!input.action?pid=${id}&pname=${param['pname']}" width="800"
					height="480" target="dialog"><span>添加</span> </a></li>
			</security:authorize>
			<security:authorize ifAnyGranted="A_DEL_DEPT">
				<li><a class="delete" href="${ctx}/account/dept!delete.action?id={sid_user}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span>
				</a></li>
			</security:authorize>
			<security:authorize ifAnyGranted="A_MODIFY_DEPT">
				<li><a class="edit" href="${ctx}/account/dept!input.action?id={sid_user}&pid=${id}&pname=${param['pname']}"
					target="dialog" width="800" height="480"><span>修改</span> </a></li>
			</security:authorize>
			<li class="line">line</li>
			<li><a class="icon" href="javascript:void(0);"><span>导入EXCEL</span> </a></li>
		</ul>
	</div>
	<table class="table" layoutH="185" rel="rightContent" width="100%">
		<thead>
			<tr>
				<th width="20" orderField="id">ID</th>
				<th width="160" orderField="name" class="${page.order}">部门名称</th>
				<th width="200">部门描述</th>
				<th width="30" orderField="orderNo" class="${page.order }">排序</th>
				<th width="30">状态</th>
				<th width="80">更新人</th>
				<th width="125" orderField="updatedtime" class="${page.order }">更新时间</th>
				<th width="80">创建人</th>
				<th width="125" orderField="createdTime" class="${page.order }">创建时间</th>
			</tr>
		</thead>
		<tbody>
			<s:iterator value="page.result" status="st">
				<tr target="sid_user" rel="${id}">
					<td><s:property value='#st.index+1' /></td>
					<td><a href="${ctx}/account/dept!input.action?id=${id}&pid=${parentDept.id}&pname=${param['pname']}"
						target="dialog" width="800" height="480">${name}</a></td>
					<td>${description}</td>
					<td>${orderNo}</td>
					<td><core:text type="STATUS" dicCode="${status}" /></td>
					<td>${updatedBy}</td>
					<td>${updatedTime}</td>
					<td>${createdBy}</td>
					<td>${createdTime}</td>
				</tr>
			</s:iterator>
		</tbody>
	</table>
</div>
<div class="panelBar">
	<div class="pages">
		<span>显示</span> <select class="combox" name="numPerPage"
			onchange="navTabPageBreak({numPerPage:this.value}, 'rightContent')">
			<option value="5" <c:if test="${page.pageSize eq '5' } ">selected="selected"</c:if>>5</option>
			<option value="10" <c:if test="${page.pageSize eq '10' }">selected="selected"</c:if>>10</option>
			<option value="20" <c:if test="${page.pageSize eq '20' }">selected="selected"</c:if>>20</option>
		</select> <span>条，共${page.totalCount}条</span>
	</div>
	<div class="pagination" totalCount="${page.totalCount }" rel="rightContent" numPerPage="${page.pageSize }"
		pageNumShown="${page.totalPages}" currentPage="${page.pageNo }"></div>
</div>